home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / amac41.zip / RFR006.QM < prev    next >
Text File  |  1991-08-26  |  15KB  |  371 lines

  1. *                               RFR006.QM
  2. *                        Written By Tom Hogshead
  3. *                       [ See RFRMxx.QM For Use ]
  4. *
  5. *                                8/13/91
  6. *  Key       Subfile                       Description
  7. * =====  ==============  ====================================================
  8. * @(1)                 --Replace "Period Space" w/ "Period Two_spaces"-Para.
  9. * @(8)                 --Replace "Period Space" w/ "Period Space Space"
  10. *                           In Whole Paragragh (Variation of @1)
  11. * @(5)   {e:\up\rfr003}--Removes "period two spaces" from Paragraph
  12. * @(2)                 --Replace "Period Space" w/ "Period Two_spaces"-Doc.
  13. * @(3)                 --Copy Character At Cursor To Line Below
  14. * @(4)                 --Insert Space At Cursor And Move Down To Next Line
  15. * @(6)                 --   (Alternate to @4 Independent of Insert Status)
  16. * @(5)                 --Deletes The Char At The Cursor
  17. *                           And Move Down To Next Line
  18. * ^(F1__)              --Move Block, Fill Old Block With Blanks
  19. * ^(F2__)              --FillBlock With Blanks
  20. * ^(F9__)              --Make A COMMA Delimited File         |(Sammy Mitchell)
  21. * ^(F0__)              -"Break Apart" A COMMA Delimited File |
  22. *
  23. *         {e:\up\RFRM*}--Return To RFRMxx.QM
  24. *
  25. *-- eoi
  26.  
  27. * 
  28. * ------------------------------------------------
  29. * ^(F1__) Block move, fills old block with blanks
  30. * ------------------------------------------------
  31. *
  32. * Mark block as column or character block, not a line block.  Move
  33. * cursor to location to move block to, press ^F1,  and block is moved to
  34. * new location.  Old block is filled with spaces.
  35. *
  36. * This macro is a slight modification to a macro written by Tim Farley
  37. * of SemWare (message #665/REGDOS conf).  I changed "Paste" to PastOver"
  38. * so all surrounding text position remains unchanged, and removed the test
  39. * if block was cut to end macro.  Tim's macro and comments are included
  40. * below this macro.
  41. *
  42. ^F1 MacroBegin
  43.         GotoBlockBeg                    * Get to block begin
  44.         JFalse END:                     * If no block, end macro
  45.         Cut                             *ELSE Cut block to scrap
  46.         Paste                           * And paste it back where it was
  47.         PrevPosition                    * Move where new block will be
  48.         FillBlock " " Return            * Fill old block with blanks
  49.         Pasteover                       * Paste old block to new loctn.
  50.  END:                                   *
  51. *
  52. * 16 bytes Thu  02-28-1991  15:14:17
  53.  
  54. * *  To: JOHN PHILLIPS                 Refer#: 665
  55. * *From: TIM FARLEY                      Read: NO
  56. * *Subj: Block_Move Problem?           Status: PUBLIC MESSAGE
  57. * *Conf: REGDOS 1                   Read Type: GENERAL (+)
  58. * *
  59. * *JP>*
  60. * *JP>* Block Cut and Move with blank fill
  61. * *JP>*
  62. * *
  63. * *Neat macro, thanks for posting it.  I'm sure there are others
  64. * *here who will take advantage of it.
  65. * *
  66. * *One thing:
  67. * *
  68. * *JP>                Store_Scrbuff 'Temp.$$$'
  69. * *JP>                Return
  70. * *JP>                Cut Paste
  71. * *JP>                FillBlock ' '
  72. * *JP>                Return
  73. * *
  74. * *I don't think the Cut/Paste sequence is actually necessary,
  75. * *unless the effect desired is to get a copy of the block into the
  76. * *scrap buffer for later use (after the macro is over) by Paste or
  77. * *PasteOver.
  78. * *
  79. * *If you really want it to work more like the "MoveBlock" command,
  80. * *you could make it simpler.  Because, with MoveBlock, you HAVE to
  81. * *have closed the block, and move the cursor to where you want it
  82. * *moved to.  Thus, you get rid of two things:  1) the need to test
  83. * *whether the block is marked, and close it if need be (not to
  84. * *mention the assumption that it is a column block); and 2) the
  85. * *need for the Pause command.
  86. * *
  87. * *Here it is:
  88. * *
  89. * @0   MacroBegin GotoBlockBeg      * Get to block
  90. *                 JFalse end:       * No move?  No block!
  91. *                 Cut               * Get into scrap
  92. *                 JFalse end:       * No cut?   No block!
  93. *                 Paste             * Put back, with marked
  94. *                 PrevPosition      * Back to where we were
  95. *                 FillBlock ' '     * Fill the original block
  96. *                 Return
  97. *                 Paste             * and put a copy at cursor.
  98. *            end:
  99. * * 19 bytes Thu  02-28-1991  15:30:52 (line added TH)
  100. *
  101. * *This macro (aside from being shorter & therefore faster) also
  102. * *quite nicely does nothing if the block is in the middle of being
  103. * *marked, or if there is no block marked.  It should work OK with
  104. * *line and character blocks too.
  105. * *
  106. * *Also:  you could modify this macro to do PasteOver instead of
  107. * *Paste at the end, which would make it paste the text "on top of"
  108. * *the pre-existing text.
  109. * *
  110. * *--Tim Farley
  111. * *  SemWare Technical Support
  112.  
  113. * =========================================================================
  114. * Date: 04-21-91 (21:24)           Number: 3786         SemWare Support BBS
  115. *   To: RON KULICK                 Refer#: NONE
  116. * From: KARL BRENDEL                 Read: YES
  117. * Subj: Shifted Text w/Block Move    Conf: (21) ILink
  118. * ------------------------------------------------------------------------
  119. * RK>When marking a block to be cut using the "Mark Column" command (ALT-K
  120. * RK>is there a way to keep the text at the right of the block from shifti
  121. * RK>left after the "Cut" command has been issued?     Thanks...
  122. *
  123. * If I understand what you're after, try:
  124. *
  125. * 
  126. * ------------------------------
  127. * ^(F2__) FillBlock With Blanks
  128. * ------------------------------
  129. * This is from the FillBlock documentation in the QEdit read.me file.
  130. *
  131. ^F2  MacroBegin GotoBlockBeg Cut Paste FillBlock ' ' Return
  132. *
  133. * 11 bytes Tue  04-23-1991  12:55:44 (line added TH)
  134.  
  135. * This may also be accomplished with:
  136. * ^F2  MacroBegin FillBlock ' ' Return
  137. * 8 bytes Mon  07-15-1991  11:25:31 (TH ^F2)
  138.  
  139.  
  140. * 
  141. * ---------------------------------------------------------------------
  142. * ^(F9__) Macro to make a comma delimited file from a file of the format:
  143. * ---------------------------------------------------------------------
  144. * Date: 10-10-90 (11:44)           Number: 10442        SemWare Support BBS
  145. *   To: ALL                        Refer#: NONE
  146. * From: SAMMY MITCHELL               Read: NO
  147. * Subj: MACROS                       Conf: 0 Main Board
  148. * ------------------------------------------------------------------------
  149. * We (SemWare) have been asked on many occasions how to change the CR/LF
  150. * characters at EOF to something else.  In most instances, the task that
  151. * the user wanted to accomplish could be done in another way.  For
  152. * example, we've had many requests to convert a mailing list file to a
  153. * comma delimited file for import into a database.  Here are some example
  154. * macros to make a comma delimited file, and convert a comma delimited
  155. * file back to its original format.  These macros will have to be
  156. * compiled with Qmac, as they are too large for Qconfig.  I do hope that
  157. * this helps someone!
  158. *
  159. *  (Key assignments changed TH    Wed  10-10-1990  )
  160. * record 1
  161. * record 2
  162. * record n
  163. *
  164. * Each group of name/address must be followed by at least one blank
  165. * line.
  166.  
  167. ^F9 MacroBegin
  168.         BegFile                         * Make sure at top
  169.   While1:
  170.         BegLine EndLine JTrue While2:   * Break out if non empty line
  171.         DelLine                         * Delete the blank line
  172.         CursorDown JFalse Macroexit:    * Exit macro if eof
  173.         CursorUp                        * Back up to the line to test
  174.         Jump While1:                    * Keep looping while blank
  175. * nonblank line found - see if next line is nonblank also
  176.   While2:
  177.         CursorDown JFalse Macroexit:    * exit macro if eof
  178.         BegLine EndLine JFalse While1:  * if blank line, start over
  179.         CursorUp EndLine "," JoinLine   * join the next line
  180.         Jump While2:                    * and keep on until blank
  181.   Macroexit:
  182.         BegFile                         * show user bof
  183. *
  184. * 37 bytes Wed  10-10-1990  22:16:45 (line added TH)
  185.  
  186. * 
  187. * ---------------------------------------------------------------------
  188. * ^(F0__) Macro to "break apart" a comma delimited file, as created from
  189. *         the ^F9  macro above.
  190. * ---------------------------------------------------------------------
  191.  
  192. ^f10 MacroBegin
  193.         BegFile                         * Start at bof
  194.   find_first_comma:
  195.         Find "," Return "" Return       * Find first comma
  196.         jFalse macroexit:               * Exit if none
  197.   makeline:
  198.         UnMarkBlock
  199.         DelCh                           * Delete the ','
  200.         SplitLine                       * Split the line
  201.         CursorDown                      * Next line
  202.         BegLine                         * Column 1
  203. * remove leading blanks
  204.   delete_blanks:
  205.         UnMarkBlock
  206.         DropAnchor
  207.         Find " " Return "GL" Return     * Blank found?
  208.         jFalse continue                 * No, continue
  209.         DelCh                           * Delete it
  210.         jump delete_blanks:             * And try again
  211.   continue:
  212.         UnMarkBlock
  213.         MarkLine                        * Look for next  ,' on line
  214.         Find "," Return "L" Return      *
  215.         jTrue makeline:                 * Split if found
  216.         UnMarkBlock
  217.         AddLine                         * Otherwise, add a blank line
  218.         jump find_first_comma:          * And look for another ','
  219.   macroexit:
  220.         BegFile                         * Show user bof
  221. *
  222. * 54 bytes Wed  10-10-1990  22:17:04 (line added TH)
  223. *
  224. * That's all, folks!
  225.  
  226. * 
  227. * ┌───────────────────────────────────────────────────────────────────┐
  228. * │@(1) Replace "period space" w/ "period space space" - PARAGRAPH    │
  229. * └───────────────────────────────────────────────────────────────────┘
  230. * This macro was written by Tim Farley of SemWare.
  231. *
  232. * =========================================================================
  233. * Date: 01-18-91 (13:59)           Number: 3433         SemWare Support BBS
  234. *   To: BOB LONG                   Refer#: 3430
  235. * From: TIM FARLEY                   Read: YES
  236. * Subj: Legibility breaks            Conf: (21) ILink
  237. * ------------------------------------------------------------------------
  238. * BL>It had to do with retaining double spaces between sentences
  239. * BL>even when they fall at the ends of lines and then get moved when the
  240. * BL>paragraph is reformed.  I reinstalled 2.1, choosing the option to
  241. * BL>retain trailing blanks, but QEdit still removes one blank.
  242. * BL>
  243. * BL>Is there a workaround?
  244. *
  245. * The only workaround I know for that one would be to encase
  246. * WrapPara in a macro, that would mark the entire paragraph as a
  247. * block, and do a global search and replace (limited to the block)
  248. * to change ".  " to ".  " to put the spaces back in.  Kludgy, and
  249. * not perfect, but perhaps workable.
  250. *
  251. * Here's what it would look like:
  252. *
  253. * *
  254. * * WrapPara modification:  retains double spacing after "." chars.
  255. * *
  256. @1      MacroBegin UnmarkBlock      * we're going to be using blocks
  257.         MarkCharacter WrapPara      * Wrap paragraph & mark rest of it
  258.         MarkCharacter GotoBlockBeg  * Close mark & go to begin of it
  259.         FindReplace ". " Return     * Change period with single space
  260.         ".  " Return "LN" Return    * to one with double space.
  261.         JFalse end:                 * None?  We're done...
  262.         FindReplace ".   " Return   * Now fix any that ended up with 3
  263.         ".  " Return "LN" Return    * to have just two again.
  264.      end:
  265.         GotoBlockEnd UnmarkBlock
  266. *
  267. * 54 bytes Fri  01-18-1991  21:23:45 (line added TH January 18, 1991)
  268. * 54 bytes Wed  07-31-1991  10:40:13 (TH @1, corrected)
  269.  
  270. *
  271. * As usual, remove the comments to the right, and reformat this all on one
  272. * line if you plan to put it in QCONFIG.DAT.
  273. *
  274. * --Tim Farley
  275.  
  276. * 
  277. * ----------------------------------------------------------------------
  278. * @(8) Replace "period space" w/ "period space space" in whole paragragh
  279. * ----------------------------------------------------------------------
  280.  
  281. * This macro is a variation of Tim Farley's @1 above, that replaces
  282. * a 'period space' with a 'period two spaces' in the whole
  283. * paragragh the cursor is positioned in and positions the cursor at
  284. * the start of the next paragragh.
  285.  
  286. @8      MacroBegin
  287.         Cursordown                  * move down one line                  |
  288.         Prevpara                    * get to beginning of paragraph       |
  289.         UnmarkBlock                 * we're going to be using blocks
  290.         MarkCharacter WrapPara      * Wrap paragraph & mark it
  291.         MarkCharacter GotoBlockBeg  * Close mark & go to begin of it
  292.         FindReplace ". " Return     * Change period with single space
  293.         ".  " Return "LN" Return    * to one with double space.
  294.         JFalse end:                 * None?  We're done...
  295.         FindReplace ".   " Return   * Now fix any that ended up with 3
  296.         ".  " Return "LN" Return    * to have just two again.
  297.      end:
  298.         Nextpara                    * go to begin next paragraph          |
  299.         UnmarkBlock
  300. *
  301. * 56 bytes Wed  07-31-1991  10:56:27 (TH @8)
  302.  
  303. * 
  304. * ┌──────────────────────────────────────────────────────────────────┐
  305. * │@(2) Replace "period space" w/ "period space space" - DOCUMENT    │
  306. * └──────────────────────────────────────────────────────────────────┘
  307. *
  308. *  Change "GN" to "G" for replacement with confirmation.
  309. *
  310. @2      MacroBegin
  311.         FindReplace ".  " Return ".  " Return "GN" Return
  312.         FindReplace ".  " Return       Return "GN" Return
  313. *
  314. * 38 bytes Wed  02-20-1991  01:09:09
  315.  
  316.  
  317. * 
  318. * ----------------------------------------------------------------------
  319. * @(3) Copy Character At Cursor To Line Below
  320. * ----------------------------------------------------------------------
  321.  
  322. @3  macrobegin
  323.     cursordown
  324.     getprev
  325.     cursorleft
  326. *
  327. * 7 bytes Sun  07-28-1991  16:45:37 (TH @3)
  328.  
  329. * 
  330. * ----------------------------------------------------------------------
  331. * @(4) Insert Space At Cursor And Move Down To Next Line
  332. * ----------------------------------------------------------------------
  333. * Insert must be ON
  334.  
  335. @4  macrobegin
  336.     " "
  337.     cursorleft
  338.     cursordown
  339. *
  340. * 8 bytes Wed  09-05-1990  16:14:32
  341.  
  342. * 
  343. * ----------------------------------------------------------------------
  344. * @(6) Insert Space At Cursor And Move Down To Next Line
  345. * ----------------------------------------------------------------------
  346.  
  347. * The following @(6) alternate approach is independent of Insert status:
  348.  
  349. @6  macrobegin
  350.     splitline
  351.     cursorright
  352.     joinline
  353.     cursordown
  354.     cursorleft
  355. *
  356. * 9 bytes Mon  07-29-1991  14:10:35 (TH @6)
  357.  
  358.  
  359. * 
  360. * ----------------------------------------------------------------------
  361. * @(5) Deletes The Char At The Cursor And Move Down To Next Line
  362. * ----------------------------------------------------------------------
  363. * Source unknown.
  364.  
  365. @5  macrobegin
  366.     delch
  367.     cursordown
  368. *
  369. * 6 bytes Tue  09-11-1990  09:40:22
  370.  
  371.